using System;
using System.Reflection;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using UnityEngine;

namespace DanielSig.UnityExtensions
{
	[System.Serializable]
	public class SpatialLog
	{
		public Vector3 Position;
		public string Message;
	}
	
	public static class XObject
	{
		private static SpatialLogger _logger;
		public static void LogAt(this object obj, Vector3 position)
		{
			if(!_logger)
				_logger = new GameObject("SpatialLogger").AddComponent<SpatialLogger>();
			_logger.Add(new SpatialLog{ Message = obj.ToString(), Position = position});
		}
	}
}

